<html>
<head><meta charset="utf-8"><title>erroneous constants in type alias · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/erroneous.20constants.20in.20type.20alias.html">erroneous constants in type alias</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="229492342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/erroneous%20constants%20in%20type%20alias/near/229492342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/erroneous.20constants.20in.20type.20alias.html#229492342">(Mar 09 2021 at 15:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/69741">https://github.com/rust-lang/rust/pull/69741</a> does some wf-checking of type aliases (and their generic bounds). It reports lints and not hard errors. Unfortunately, if those bounds mention arrays, and the length of the array fails to compute (<code>1/0</code> or sth else that is guaranteed to fail), then we still report a hard error.</p>
<p>The lang team decision on that PR was to not make invalid bounds a hard error, but erroneous constants were never touched. <span class="user-group-mention" data-user-group-id="1916">@WG-const-eval</span> would prefer if we just made them hard errors. Considering that there were no instances on crater that actually had erroneous constants in wf-bounds, how do you (<span class="user-group-mention" data-user-group-id="1977">@T-lang</span>) feel about this?</p>
<p>cc <span class="user-mention" data-user-id="119031">@Esteban Küber</span> (PR author)</p>



<a name="229517936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/erroneous%20constants%20in%20type%20alias/near/229517936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/erroneous.20constants.20in.20type.20alias.html#229517936">(Mar 09 2021 at 17:33)</a>:</h4>
<p>Seems generally reasonable to me.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>